/**
 * Created by Administrator on 2017-04-07.
 */
// import _ from 'lodash'
const setRoleId = 'setRoleId'
const setUserName = 'setUserName'

const setIP = 'setIP'

const setMsg = 'setMsg'
const setRet = 'setRet'
const setShowMsg = 'setShowMsg'
// 代理商商家列表页面
const setKA = 'setKA'
const setKAE = 'setKAE'
const setKAH = 'setKAH'
// 管理员商家列表页面
const setKM = 'setKM'
const setKMH = 'setKMH'
const setKMU = 'setKMU'
// 代理商库存管理
// const setSA = 'setSA'
// 管理员库存管理
const setSM = 'setSM'
const setSMAI = 'setSMAI'
const setSMAN = 'setSMAN'
// 全部设置
const setAP = 'setAP'

const setHasLogin = 'setHasLogin'
const setShowPageNum = 'setShowPageNum'
const setAvatar = 'setAvatar'
const setCompanyName = 'setCompanyName'
const setShowRefreshPage = 'setShowRefreshPage'

export default {
    [setRoleId] (state, payload) {
        state.roleId = payload.item
    },
    [setUserName] (state, payload) {
        state.userName = payload.item
    },

    [setIP] (state, payload) {
        state.IP = payload.item
    },

    [setMsg] (state, payload) {
        state.msg = payload.item
    },
    [setRet] (state, payload) {
        state.ret = payload.item
    },
    [setShowMsg] (state, payload) {
        state.showMsg = payload.item
    },

    [setKA] (state, payload) {
        state.page1KTVAgent = payload.item
    },
    [setKAE] (state, payload) {
        state.page1KTVAgentEdit = payload.item
    },
    [setKAH] (state, payload) {
        state.page1KTVAgentHistory = payload.item
    },

    [setKM] (state, payload) {
        state.page1KTVManage = payload.item
    },
    [setKMH] (state, payload) {
        state.page1KTVManageHistory = payload.item
    },
    [setKMU] (state, payload) {
        state.page1KTVManageUpdate = payload.item
    },

    // [setSA] (state, payload) {
    //     state.page2StoreAgent = payload.item
    // },

    [setSM] (state, payload) {
        state.page2StoreManage = payload.item
    },
    [setSMAI] (state, payload) {
        state.page2StoreManageAgentId = payload.item
    },
    [setSMAN] (state, payload) {
        state.page2StoreManageAgentName = payload.item
    },

    [setAP] (state, payload) {
        state.page1KTVAgent = 0
        state.page1KTVManage = 0
        state.page2StoreAgent = 0
        state.page2StoreManage = 0
        state.page3ActionLog = 0
        state.page4ApkManage = 0
    },

    [setHasLogin] (state, payload) {
        state.hasLogin = payload.item
    },
    [setShowPageNum] (state, payload) {
        state.showPageNum = payload.item
    },
    [setAvatar] (state, payload) {
        state.avatar = payload.item
    },
    [setCompanyName] (state, payload) {
        state.companyName = payload.item
    },
    [setShowRefreshPage] (state, payload) {
        state.showRefreshPage = payload.item
    }
}
